package health.lm.com.shop.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import health.lm.com.component_base.helper.ImageLoaderHelper;
import health.lm.com.shop.R;
import health.lm.com.shop.entity.CompanyDynamicItemEntity;

/**
 * 智库
 * @author Administrator
 */

public class CompanyDynamicItemAdapter extends BaseQuickAdapter<CompanyDynamicItemEntity,BaseViewHolder> {
    public CompanyDynamicItemAdapter(@Nullable List<CompanyDynamicItemEntity> data) {
        super(R.layout.item_dynamic, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CompanyDynamicItemEntity item) {
        helper.setText(R.id.tv_content_title,item.getTitle())
                .setText(R.id.tv_content_type,item.getType())
                .setText(R.id.tv_content_reading,item.getClick() + "阅读")
                .setText(R.id.tv_content_type,item.getType());
        ImageLoaderHelper.getInstance().load(mContext,item.getPic(),helper.getView(R.id.iv_content_pic));
    }
}
